<%-- 
    Document   : moncompte
    Created on : 5 mars 2013, 16:21:16
    Author     : Alice
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@taglib uri="/struts-tags" prefix="s" %>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<!DOCTYPE html>

<jsp:include page="header.jsp"></jsp:include>
<s:div id="bloc_contenu">
    <s:div id="zone_moncompte">
        <center>
            <h2>Mon Compte</h2>
            <c:if test="${empty message}">
                Vous avez un solde de : <b><fmt:formatNumber maxFractionDigits="2"><s:property value="#session['USER'].getBalance()" /></fmt:formatNumber> <s:if test="#session['USER'].getCountry().devise=='USD'">$</s:if><s:else>€</s:else>
                   
                </b>
            </c:if>
            <c:if test="${not empty message}">
                Vous avez un solde de : <b><fmt:formatNumber maxFractionDigits="2"><s:property value="#session['USER'].getBalance()+count" /></fmt:formatNumber> <s:if test="#session['USER'].getCountry().devise=='USD'">$</s:if><s:else>€</s:else>                  
                </b><br />
                <fmt:formatNumber maxFractionDigits="2"><s:property value="#session['USER'].setBalance(#session['USER'].getBalance()+count)"/></fmt:formatNumber>
                <br /><font color="green">${message}</font>
            </c:if>

            <br /><br /><s:form name="crediter_compte" namespace="/" action="crediterCompte">
                <s:password label="Mot de passe" name="password"/>
                <s:textfield label="Montant du crédit" name="count"/>

                <s:submit type="image" value="connection" src="pages/img/btn_crediter.png" cssClass="espace_top"/>         
            </s:form>

        </center>
    </s:div>
</s:div>
<jsp:include page="footer.jsp"></jsp:include>
